<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>摆渡村-壁纸-首页</title>
    <link rel="stylesheet" th:href="@{/css/menu.css}">
    <link rel="stylesheet" th:href="@{/css/type.css}">
    <script rel="script" th:src="@{/js/vue.js}"></script>
    <style>
        ::-webkit-scrollbar {display:none}
    </style>
</head>
<body>

    <div class="nav">
        <div class="brand">
            <div class="brand-title">后台壁纸管理</div>
        </div>
        <div class="menu">
            <ul>
                <li><a th:href="@{/upload}">上传</a></li>
                <li><a th:href="@{/view}">壁纸</a></li>
                <li><a th:href="@{/type}">类型</a></li>
            </ul>
        </div>
        <div class="user">
            <div class="user-login">摆渡人</div>
        </div>
    </div>

    <div class="type" style="margin-top: 100px;">
        <div class="type-context">
            <h2 style="margin-left: 20px;margin-bottom: 20px;">添加类型</h2>
            <h5 style="color: red;margin-top: 10px;margin-left: 20px;" th:text="${msg}"></h5>
            <form class="input" th:action="@{/type/add}" method="post">
                <div>
                    <label>
                        <input type="text" placeholder="添加新类型" name="name">
                    </label>
                </div>
                <div>
                    <label>
                        <input type="submit" value="添加">
                    </label>
                </div>
            </form>
            <table class="list">
                <tr>
                    <th class="tp" style="padding-bottom: 20px;">类型名称</th>
                    <th class="op" style="padding-bottom: 20px;">操作</th>
                </tr>
                <tr th:each="type:${types}">
                    <td th:text="${type.wallTypeName}"></td>
                    <td>
                        <a th:href="@{'/type/delete/'+ ${type.wallTypeId}}">删除</a>
                    </td>
                </tr>
            </table>
        </div>
    </div>

</body>
</html>